<include file="Public/header" />
    <div class="wrapper wrapper-content animated fadeInRight">

            <div class="row">
                <div class="col-sm-12">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>权限分配</h5>

                            <div class="ibox-tools">
                                 <a class="collapse-link" href="{:U('member/adminedit')}">
                                    <i class="fa fa-plus"></i>添加后台用户
                                </a>
                 
                            </div>


            
                        </div>
                        <div class="ibox-content">

                            <table class="table table-striped table-bordered table-hover dataTables-example dataTable" data-page-size="8">
                                <thead>
                                <tr>
                                    <th>#</th>
                                    <th>用户名</th>
                                    <th>email</th>
                                    <th>真实姓名</th>
                                    <th>权限名</th>
                                    <th>qq_oid</th>
                                    <th>状态</th>
                                    <th>最后登陆IP</th>
                                    <th>最后登陆时间</th>
                                    <th>操作</th>


                          
                                </tr>
                                </thead>
                                <tbody>
                                <?php foreach ($admin as $key => $v): ?>
                                    <tr>
                                    <td>{$v.id}</td>
                                        <td>{$v.user_login}</td>
                                        <td>{$v.user_email}</td>
                                        <td><?php if($v['display_name']){ echo $v['display_name'];}else{ echo " <i class='fa fa-times'></i>";} ?></td>
                                        <td>{$v.Rname}</td>
                                        <td><?php if($v['qq_oid']){ echo $v['qq_oid'];}else{ echo " <i class='fa fa-times'></i>";} ?></td>
                                        <td><?php if($v['user_status']==1){ echo "<i class='fa fa-check'></i>";}else{echo " <i class='fa fa-times'></i>";} ?></td>
                                         <td><?php if($v['last_login_ip']){ echo $v['last_login_ip'];}else{ echo " <i class='fa fa-times'></i>";} ?></td>
                                         <td><?php if($v['last_login_time']){ echo $v['last_login_time'];}else{ echo " <i class='fa fa-times'></i>";} ?></td>
                                         <td>
                                             <?php if($v['id']!=1){ ?>
                                                 <a class="btn btn-outline btn-xs btn-primary" href="{:U('Admin/member/adminedit',array('id'=>$v['id']))}">修改</a>
                                             <a class="btn btn-outline btn-xs btn-danger cmzdel" where="id={$v.id}" table="admin">删除</a>
                                            <?php }else{ ?>
                                            <a class="btn btn-outline btn-xs btn-default">修改</a>
                                             <a class="btn btn-outline btn-xs btn-default ">删除</a>
                                             <?php } ?>

                                         </td>
                                     </tr>
                              <?php endforeach ?>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <td colspan="5">
                                        <ul class="pagination pull-right"></ul>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>

                        </div>
                    </div>
                </div>
            </div>
            
        </div>
